#define _CRT_SECURE_NO_WARNINGS
#include"binarytree.h"

int main()
{
	char arr[17] = "ABD##E#H##CF##G##";
	char arr2[] = "ABC##D##EF##G##";
	int i = 0;
	BTNode* Tree = BinaryTreeCreate(arr, 17, &i);
	i = 0;
	printf("%d\n", BinaryTreeSize(Tree));
	printf("%d\n", BinaryTreeLeafSize(Tree));
	printf("%d\n", BinaryTreeLevelKSize(Tree, 3));
	BTNode* find = BinaryTreeFind(Tree, 'c');
	if (find != NULL)printf("%c\n", find->date);
	else printf("NULL\n");
	BinaryTreePrevOrder(Tree);
	printf("\n");
	BinaryTreeInOrder(Tree);
	printf("\n");
	BinaryTreePostOrder(Tree);
	printf("\n");
	BinaryTreeLevelOrder(Tree);
	printf("\n");
	printf("%d\n",BinaryTreeComplete(Tree));

	BTNode* Tree2 = BinaryTreeCreate(arr2, 10, &i);
	printf("%d\n", BinaryTreeComplete(Tree2));
	BinaryTreeDestroy(Tree);
	Tree = NULL;
	return 0;
}